num = int(input())
a = num % 10
num //= 10
b = num % 10
num //= 10
c = num % 10
num //= 10
d = num % 10
print(a)
print(b)
print(c)
print(d)